<template>
  <div class="title-classic" id="fix">
    <div class="back" @click="backHandler">
        <i class="iconfont">&#xe657;<span>{{change()}}</span></i>
    </div>
     <div>
        <i class="iconfont more"><a href="">&#xe67f;</a>
            <span>更多</span>
        </i>
    </div>
  </div>
</template>

<script>
export default {
  name: 'TitleClassical',
  methods: {
    change () {
      var flag = this.$route.params.id
      switch (flag) {
        case '2':
          this.$route.meta.title = '女装'
          return this.$route.meta.title
        case '5':
          this.$route.meta.title = '男装'
          return this.$route.meta.title
        case '3':
          this.$route.meta.title = '美妆护肤'
          return this.$route.meta.title
        case '4':
          this.$route.meta.title = '配饰'
          return this.$route.meta.title
        case '13':
          this.$route.meta.title = '女鞋'
          return this.$route.meta.title
        case '19':
          this.$route.meta.title = '男鞋'
          return this.$route.meta.title
        case '10':
          this.$route.meta.title = '零食'
          return this.$route.meta.title
        case '16':
          this.$route.meta.title = '内衣袜子'
          return this.$route.meta.title
        case '24':
          this.$route.meta.title = '母婴用品'
          return this.$route.meta.title
        case '14':
          this.$route.meta.title = '箱包'
          return this.$route.meta.title
        case '15':
          this.$route.meta.title = '个人洗护'
          return this.$route.meta.title
        case '12':
          this.$route.meta.title = '数码家电'
          return this.$route.meta.title
        case '17':
          this.$route.meta.title = '成人用品'
          return this.$route.meta.title
        case '7':
          this.$route.meta.title = '日用家居'
          return this.$route.meta.title
        case '11':
          this.$route.meta.title = '文体娱乐'
          return this.$route.meta.title
      }
    },
    backHandler () {
      this.$router.back()
    }
  }
}
</script>

<style lang="scss" scoped>
.title-classic{
      background:#FF6600;
        height: 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .iconfont{
          span{
                margin-left: 4px;
                font-size: 13px;
            }
        }
        .more{
            font-size: 15px;
            span{
                margin-left: 4px;
                font-size: 13px;
            }
        }
    }
    #fix{
       position:fixed;
       width: 100%;
       top:0px;
       z-index:3;
    }
</style>
